<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Схема разработана Управлением актуализации и модернизации руководств по структурированным электронным медицинским документам (СЭМД) 2023 -->
<!-- Включены элементы разработанные Health Level Seven -->
<xs:schema xmlns="urn:hl7-ru:identity" xmlns:xs="http://www.w3.org/2001/XMLSchema" targetNamespace="urn:hl7-ru:identity" elementFormDefault="qualified" xmlns:hl7="urn:hl7-org:v3">
	<!--
*****************************************************************************************************************
* XML schema for message type POCD_MT000040.
* Generated by XMLITS version 2.0
*
* Copyright (c) 2002, 2003, 2004, 2005 Health Level Seven. All rights reserved.
*  Redistribution and use in source and binary forms, with or without
*  modification, are permitted provided that the following conditions
*  are met:
*  1. Redistributions of source code must retain the above copyright
*     notice, this list of conditions and the following disclaimer.
*  2. Redistributions in binary form must reproduce the above copyright
*     notice, this list of conditions and the following disclaimer in the
*     documentation and/or other materials provided with the distribution.
*  3. All advertising materials mentioning features or use of this software
*     must display the following acknowledgement:
*       This product includes software developed by Health Level Seven.
*  THIS SOFTWARE IS PROVIDED BY HEALTH LEVEL SEVEN, INC. AND CONTRIBUTORS "AS IS" AND
*  ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
*  IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
*  ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
*  FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
*  DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
*  OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
*  HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
*  LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
*  OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
*  SUCH DAMAGE.
*
********************************************************************************************************************
	  -->
	<xs:import namespace="urn:hl7-org:v3" schemaLocation="coreschemas\datatypes-base.xsd"/>
	<xs:element name="Patronymic" type="hl7:ST"/>
	
	<!-- Блок "Сведения о документе, удостоверяющем личность" -->
	<xs:element name="IdentityDoc" type="POCD_MT000040.IdentityDoc">
	</xs:element>
	<xs:complexType name="POCD_MT000040.IdentityDoc">
		<xs:choice minOccurs="0">
			<xs:sequence>
				<xs:element name="IdentityCardType" minOccurs="1" maxOccurs="1">
					<xs:annotation>
						<xs:documentation>тип документа</xs:documentation>
					</xs:annotation>
					<xs:complexType>
						<xs:complexContent>
							<xs:restriction base="hl7:CE_non_elements">
								<xs:attribute name="code" type="hl7:cs" use="required"/>
								<xs:attribute name="codeSystem" type="hl7:uid" use="required" fixed="1.2.643.5.1.13.13.99.2.48"/>
								<xs:attribute name="codeSystemName" type="hl7:st" use="required"/>							
								<xs:attribute name="codeSystemVersion" type="hl7:st" use="required"/>							
								<xs:attribute name="displayName" type="hl7:st" use="required"/>
								<xs:attribute name="nullFlavor" type="hl7:NullFlavor" use="prohibited"/>						
							</xs:restriction>
						</xs:complexContent>
					</xs:complexType>
				</xs:element>
				<xs:element name="Series" type="hl7:ST" minOccurs="1" maxOccurs="1">
					<xs:annotation>
						<xs:documentation>серия документа</xs:documentation>
					</xs:annotation>
				</xs:element>
				<xs:element name="Number" type="hl7:ST_non_NF" minOccurs="1" maxOccurs="1">
					<xs:annotation>
						<xs:documentation>номер документа</xs:documentation>
					</xs:annotation>
				</xs:element>
				<xs:element name="IssueOrgName" type="hl7:ST" minOccurs="1" maxOccurs="1">
					<xs:annotation>
						<xs:documentation>кем выдан документ</xs:documentation>
					</xs:annotation>
				</xs:element>
				<xs:element name="IssueOrgCode" type="hl7:ST" minOccurs="1" maxOccurs="1">
					<xs:annotation>
						<xs:documentation>кем выдан документ, код подразделения</xs:documentation>
					</xs:annotation>
				</xs:element>
				<xs:element name="IssueDate" minOccurs="1" maxOccurs="1">
					<xs:annotation>
						<xs:documentation>дата выдачи документа</xs:documentation>
					</xs:annotation>
					<xs:complexType>
						<xs:complexContent>
							<xs:restriction base="hl7:TS">
								<xs:attribute name="value" use="required" type="hl7:ts"/>
								<xs:attribute name="nullFlavor" type="hl7:NullFlavor" use="prohibited"/>
							</xs:restriction>
						</xs:complexContent>
					</xs:complexType>
				</xs:element>
			</xs:sequence>
		</xs:choice>
		<xs:attribute name="nullFlavor" type="hl7:NullFlavor" use="optional"/>
	</xs:complexType>
	
	<!-- Блок "Сведения о полисе ОМС пациента" -->
	<xs:element name="InsurancePolicy" type="POCD_MT000040.InsurancePolicy">
	</xs:element>
	<xs:complexType name="POCD_MT000040.InsurancePolicy">
		<xs:choice minOccurs="0">
			<xs:sequence>
				<xs:element name="InsurancePolicyType" minOccurs="1" maxOccurs="1">
					<xs:annotation>
						<xs:documentation>тип полиса ОМС</xs:documentation>
					</xs:annotation>
					<xs:complexType>
						<xs:complexContent>
							<xs:restriction base="hl7:CE_non_elements">
								<xs:attribute name="code" type="hl7:cs" use="required"/>
								<xs:attribute name="codeSystem" type="hl7:uid" use="required" fixed="1.2.643.5.1.13.13.11.1035"/>
								<xs:attribute name="codeSystemName" type="hl7:st" use="required"/>							
								<xs:attribute name="codeSystemVersion" type="hl7:st" use="required"/>							
								<xs:attribute name="displayName" type="hl7:st" use="required"/>
								<xs:attribute name="nullFlavor" type="hl7:NullFlavor" use="prohibited"/>							
							</xs:restriction>
						</xs:complexContent>
					</xs:complexType>
				</xs:element>
				<xs:element name="Series" type="hl7:st" minOccurs="0" maxOccurs="1">
					<xs:annotation>
						<xs:documentation>серия полиса ОМС</xs:documentation>
					</xs:annotation>
				</xs:element>
				<xs:element name="Number" type="hl7:ST_non_NF" minOccurs="1" maxOccurs="1">
					<xs:annotation>
						<xs:documentation>номер полиса ОМС</xs:documentation>
					</xs:annotation>
				</xs:element>
			</xs:sequence>
		</xs:choice>
		<xs:attribute name="nullFlavor" type="hl7:NullFlavor" use="optional"/>
	</xs:complexType>
	
	<!-- Блок "Реквизиты организации" -->
	<xs:element name="Props" type="POCD_MT000040.Props">
	</xs:element>
	<xs:complexType name="POCD_MT000040.Props">
		<xs:choice minOccurs="0">
			<xs:sequence>
				<xs:element name="Ogrn" type="hl7:st" minOccurs="0" maxOccurs="1">
					<xs:annotation>
						<xs:documentation>код ОГРН</xs:documentation>
					</xs:annotation>
				</xs:element>
				<xs:element name="Ogrnip" type="hl7:st" minOccurs="0" maxOccurs="1">
					<xs:annotation>
						<xs:documentation>код ОГРНИП</xs:documentation>
					</xs:annotation>
				</xs:element>
				<xs:element name="Okpo" type="hl7:st" minOccurs="0" maxOccurs="1">
					<xs:annotation>
						<xs:documentation>код ОКПО</xs:documentation>
					</xs:annotation>
				</xs:element>
				<xs:element name="Okato" type="hl7:st" minOccurs="0" maxOccurs="1">
					<xs:annotation>
						<xs:documentation>код ОКАТО</xs:documentation>
					</xs:annotation>
				</xs:element>
			</xs:sequence>
		</xs:choice>
		<xs:attribute name="nullFlavor" type="hl7:NullFlavor" use="optional"/>
	</xs:complexType>
	
	<!-- Блок "Сведения о документе, удостоверяющем полномочия представителя" -->
	<xs:element name="AuthorityDoc" type="POCD_MT000040.AuthorityDoc">
	</xs:element>
	<xs:complexType name="POCD_MT000040.AuthorityDoc">
		<xs:choice minOccurs="0">
			<xs:sequence>
				<xs:element name="IdentityCardType" minOccurs="1" maxOccurs="1">
					<xs:annotation>
						<xs:documentation>тип документа</xs:documentation>
					</xs:annotation>
					<xs:complexType>
						<xs:complexContent>
							<xs:restriction base="hl7:CE_non_elements">
								<xs:attribute name="code" type="hl7:cs" use="required"/>
								<xs:attribute name="codeSystem" type="hl7:uid" use="required" fixed="1.2.643.5.1.13.13.99.2.313"/>
								<xs:attribute name="codeSystemName" type="hl7:st" use="required"/>							
								<xs:attribute name="codeSystemVersion" type="hl7:st" use="required"/>							
								<xs:attribute name="displayName" type="hl7:st" use="required"/>
								<xs:attribute name="nullFlavor" type="hl7:NullFlavor" use="prohibited"/>						
							</xs:restriction>
						</xs:complexContent>
					</xs:complexType>
				</xs:element>
				<xs:element name="Series" type="hl7:ST" minOccurs="1" maxOccurs="1">
					<xs:annotation>
						<xs:documentation>серия документа</xs:documentation>
					</xs:annotation>
				</xs:element>
				<xs:element name="Number" type="hl7:ST_non_NF" minOccurs="1" maxOccurs="1">
					<xs:annotation>
						<xs:documentation>номер документа</xs:documentation>
					</xs:annotation>
				</xs:element>
				<xs:element name="IssueOrgName" type="hl7:ST" minOccurs="1" maxOccurs="1">
					<xs:annotation>
						<xs:documentation>кем выдан документ</xs:documentation>
					</xs:annotation>
				</xs:element>
				<xs:element name="IssueDate" minOccurs="1" maxOccurs="1">
					<xs:annotation>
						<xs:documentation>дата выдачи документа</xs:documentation>
					</xs:annotation>
					<xs:complexType>
						<xs:complexContent>
							<xs:restriction base="hl7:TS">
								<xs:attribute name="value" use="required" type="hl7:ts"/>
								<xs:attribute name="nullFlavor" type="hl7:NullFlavor" use="prohibited"/>
							</xs:restriction>
						</xs:complexContent>
					</xs:complexType>
				</xs:element>
			</xs:sequence>
		</xs:choice>
		<xs:attribute name="nullFlavor" type="hl7:NullFlavor" use="prohibited"/>
	</xs:complexType>

	<!-- Блок "Сведения о документе-основании" -->
	<xs:element name="DocInfo" type="POCD_MT000040.DocInfo">
	</xs:element>
	<xs:complexType name="POCD_MT000040.DocInfo">
		<xs:choice minOccurs="0">
			<xs:sequence>
				<xs:element name="IdentityDocType" minOccurs="1" maxOccurs="1">
					<xs:annotation>
						<xs:documentation>тип документа основания</xs:documentation>
					</xs:annotation>
					<xs:complexType>
						<xs:complexContent>
							<xs:restriction base="hl7:CE_non_elements">
								<xs:attribute name="code" type="hl7:cs" use="required"/>
								<xs:attribute name="codeSystem" type="hl7:uid" use="required" fixed="1.2.643.5.1.13.13.99.2.724"/>
								<xs:attribute name="codeSystemName" type="hl7:st" use="required"/>							
								<xs:attribute name="codeSystemVersion" type="hl7:st" use="required"/>							
								<xs:attribute name="displayName" type="hl7:st" use="required"/>
								<xs:attribute name="nullFlavor" type="hl7:NullFlavor" use="prohibited"/>							
							</xs:restriction>
						</xs:complexContent>
					</xs:complexType>
				</xs:element>
				<xs:element name="InsurancePolicyType" minOccurs="1" maxOccurs="1">
					<xs:annotation>
						<xs:documentation>тип полиса ОМС</xs:documentation>
					</xs:annotation>
					<xs:complexType>
						<xs:complexContent>
							<xs:restriction base="hl7:CE_non_elements">
								<xs:attribute name="code" type="hl7:cs" use="optional"/>
								<xs:attribute name="codeSystem" type="hl7:uid" use="optional" fixed="1.2.643.5.1.13.13.11.1035"/>
								<xs:attribute name="codeSystemName" type="hl7:st" use="optional"/>							
								<xs:attribute name="codeSystemVersion" type="hl7:st" use="optional"/>							
								<xs:attribute name="displayName" type="hl7:st" use="optional"/>
								<xs:attribute name="nullFlavor" use="optional">
									<xs:simpleType>
										<xs:restriction base="hl7:NullFlavor">
											<xs:enumeration value="NA"/>
											<xs:enumeration value="NAV"/>
										</xs:restriction>
									</xs:simpleType>
								</xs:attribute>
							</xs:restriction>
						</xs:complexContent>
					</xs:complexType>
				</xs:element>
				<xs:element name="Series" type="hl7:ST" minOccurs="1" maxOccurs="1">
					<xs:annotation>
						<xs:documentation>серия документа</xs:documentation>
					</xs:annotation>
				</xs:element>
				<xs:element name="Number" type="hl7:ST" minOccurs="1" maxOccurs="1">
					<xs:annotation>
						<xs:documentation>номер документа</xs:documentation>
					</xs:annotation>
				</xs:element>
				<xs:element name="INN" type="hl7:ST" minOccurs="1" maxOccurs="1">
					<xs:annotation>
						<xs:documentation>ИНН организации или физического лица</xs:documentation>
					</xs:annotation>
				</xs:element>
				<xs:element name="effectiveTime" type="Effective_time" minOccurs="1" maxOccurs="1">
					<xs:annotation>
						<xs:documentation>срок действия документа</xs:documentation>
					</xs:annotation>
				</xs:element>
			</xs:sequence>
		</xs:choice>
		<xs:attribute name="nullFlavor" use="optional">
			<xs:simpleType>
				<xs:restriction base="hl7:NullFlavor">
					<xs:enumeration value="NAV"/>
					<xs:enumeration value="NA"/>
				</xs:restriction>
			</xs:simpleType>
		</xs:attribute>
	</xs:complexType>
	<!-- Блок "Срок дейсвия документа-основания" -->
	<xs:complexType name="Effective_time">
		<xs:choice minOccurs="0">
			<xs:sequence>
				<xs:element name="low" minOccurs="1" maxOccurs="1">
					<xs:annotation>
						<xs:documentation>дата начала действия документа</xs:documentation>
					</xs:annotation>
					<xs:complexType>
						<xs:complexContent>
							<xs:restriction base="hl7:IVXB_TS">
								<xs:attribute name="nullFlavor" type="hl7:NullFlavor" use="prohibited"/>
							</xs:restriction>
						</xs:complexContent>
					</xs:complexType>
				</xs:element>				
				<xs:element name="high" type="hl7:IVXB_TS" minOccurs="1" maxOccurs="1">
					<xs:annotation>
						<xs:documentation>дата окончания действия документа</xs:documentation>
					</xs:annotation>
				</xs:element>
			</xs:sequence>
		</xs:choice>
		<xs:attribute name="nullFlavor" type="hl7:NullFlavor" use="optional"/>		
	</xs:complexType>
	
	<!-- Элемент "Уникальный идентификатор" устройства, имплантанта -->
	<xs:element name="Device" type="hl7:st"/>
</xs:schema>